public class BaconPizza extends Pizza {
    private String gram;
    private String name;
    public BaconPizza(){}

    public BaconPizza(String gram) {
        this.gram = gram;
    }

    public String getName(){
        return this.name="培根披萨";
    }
    public String getGram() {
        return gram;
    }

    public void setGram(String gram) {
        this.gram = gram;
    }

    @Override
    public String showInfo() {
        return super.showInfo()+String.format("\n培根克数："+getGram());
    }
}
